//
//  YishuCell3.m
//  New
//
//  Created by 才诗琦 on 16/1/25.
//  Copyright © 2016年 www.lanou3g.com. All rights reserved.
//

#import "YishuCell3.h"

@implementation YishuCell3
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    
    if (self) {
        //第一张图
        self.imagView = [[UIImageView alloc] init];
        _imagView.layer.cornerRadius = 5;
        _imagView.clipsToBounds = YES;
        [self.contentView addSubview: _imagView];
        [_imagView release];
        
        
        //第二张图
        self.imagView1 = [[UIImageView alloc] init];
        _imagView1.layer.cornerRadius = 5;
        _imagView1.clipsToBounds = YES;
        [self.contentView addSubview: _imagView1];
        [_imagView1 release];
        //第三张图
        self.imagView2 = [[UIImageView alloc] init];
        _imagView2.layer.cornerRadius = 5;
        _imagView2.clipsToBounds = YES;
        [self.contentView addSubview: _imagView2];
        [_imagView2 release];
        
        
        //标题
        self.titleLabel = [[UILabel alloc] init];
        _titleLabel.font = [UIFont systemFontOfSize:20];
        
        [self.contentView addSubview: _titleLabel];
        [_titleLabel release];
        
        
        
    }
    
    return self;
    
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    
    self.imagView.frame = CGRectMake(5, 50, (self.contentView.frame.size.width-20) / 3, (self.contentView.frame.size.width-20) / 3);
    
    self.imagView1.frame = CGRectMake(10 + (self.contentView.frame.size.width-20) / 3, 50, (self.contentView.frame.size.width-20) / 3, (self.contentView.frame.size.width-20) / 3);
    
    self.imagView2.frame = CGRectMake(15 + 2 * (self.contentView.frame.size.width-20) / 3, 50, (self.contentView.frame.size.width-20) / 3, (self.contentView.frame.size.width-20) / 3);
    
    self.titleLabel.frame = CGRectMake(10, 10, self.contentView.frame.size.width-20, 40);
    
    
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
